#!/usr/bin/perl -I../lib/
#===============================================================================
#
#         FILE:  KernelBuilder.pl
#
#        USAGE:  ./KernelBuilder.pl 
#
#  DESCRIPTION:  
#
#      OPTIONS:  ---
# REQUIREMENTS:  ---
#         BUGS:  ---
#        NOTES:  ---
#       AUTHOR:   (), <>
#      COMPANY:  
#      VERSION:  1.0
#      CREATED:  12/08/2008 01:38:33 AM CET
#     REVISION:  ---
#===============================================================================

use strict;
use warnings;
#use blib "../lib";
use VL::KernelBuilder;
use Net::FTP;
use Cwd;


sub getSource {

	my ( $version, $destDir ) = @_; 
	my $host = "ftp.kernel.org";
	my $filename = "linux-$version.tar.gz";
	my $srcDir = "pub/linux/kernel/v2.6/";

	my $ftp = Net::FTP->new($host, Passive =>1) or die "Cannot connect to $host: $@";
	
	$ftp->login("anonymous");
	$ftp->binary;
	$ftp->cwd($srcDir);
	$ftp->get($filename);
	$ftp->quit;
	
	return ;
}	

getSource "2.6.27.8";
